<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="box">
        <p><input type="text" value="北京市" id="beijin"></p>
        <p><input type="text" value="朝阳区" id="chaoyang"></p>
        <p><button onclick="chuancan()">传参</button></p>
    </div>
</body>

<script type="text/javascript">
    //先将两个不同的Input框里的内容获取回来
    var zsc = document.getElementById("beijin");
    var zsc1 = document.getElementById("chaoyang");

    //点击事件
    function chuancan() {
        alert(zsc.value)
        alert(zsc1.value)
    }
</script>

</html>
<style>
    .box {
        width: 200px;
        height: 100px;
        margin: auto;
        text-align: center;
    }
</style>